/**
 * Copyright (c) 2018-2028, HQY 胡庆一 (215218393@qq.com).
 * <p>
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/lgpl.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.ocm.order.service;

import com.ocm.order.dto.DeliverDTO;
import com.ocm.order.dto.RefundDTO;
import com.ocm.order.vo.OrderPayVO;
import com.ocm.order.vo.OrderVO;
import com.ocm.order.vo.UOrderVO;
import com.ocm.order.dto.OrderDTO;
import com.ocm.order.dto.OrderPayDTO;
import com.ocm.order.entity.Order;
import com.ocm.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ocm.order.vo.UOrderDetailVO;
import org.springframework.lang.Nullable;

/**
 *  服务类
 *
 * @author HQY
 * @since 2022-01-16
 */
public interface IOrderService extends BaseService<Order> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param order
	 * @return
	 */
	IPage<OrderVO> selectOrderPage(IPage<OrderVO> page, OrderVO order);

	OrderPayVO create(OrderDTO order);

    Integer getOrderStatus(Long id);

	IPage<UOrderVO> uList(IPage<UOrderVO> page, Long userId, Integer status);

	Boolean uPay(OrderPayDTO orders, Long userId,String userName);

    Integer getStatusById(Long orderId);

	void deliver(DeliverDTO deliverDTO, Long shopId);


	void refund(RefundDTO orders, @Nullable Long shopId, Long afterOrderId);

	void refund(Long orderId,@Nullable Long userId);

	void  orderAfterRefund(Long orderId,Long shopId);

	UOrderDetailVO getOrderDetail(Order order);


	void receiving(Long orderId, Long userId);
}
